{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "14a71cf0-4339-4ae6-982d-7dda15f3810e",
   "metadata": {},
   "source": [
    "# SAS Notebooks with jupytext"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "47346888-e79f-4205-82fd-3a5fdfde9b4d",
   "metadata": {},
   "outputs": [],
   "source": [
    "proc sql;\n",
    "    select *\n",
    "    from sashelp.cars (obs=10)\n",
    "    ;\n",
    "quit; "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c96b0faf-26fe-4245-a1d9-78dee30b19c3",
   "metadata": {},
   "outputs": [],
   "source": [
    "%let name = \"Jupytext\";"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "56cafffb-e397-4c3b-97ab-c6970149b6bc",
   "metadata": {},
   "outputs": [],
   "source": [
    "%put &name;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bbc273c9-8690-450d-bd9b-2d075d512437",
   "metadata": {},
   "outputs": [],
   "source": [
    "/* Note when defining macros \"%macro\" cannot be the first line of text in the cell */\n",
    "%macro test;\n",
    "    data temp;\n",
    "        set sashelp.cars;\n",
    "        name = \"testx\";\n",
    "    run; \n",
    "    proc print data = temp (obs=10);\n",
    "    run; \n",
    "%mend test;\n",
    "\n",
    "%test"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "SAS",
   "language": "sas",
   "name": "sas"
  },
  "language_info": {
   "codemirror_mode": "sas",
   "file_extension": ".sas",
   "mimetype": "text/x-sas",
   "name": "sas"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
